package com.jemaa.news.utils;

import org.displaytag.decorator.TableDecorator;

import com.jemaa.news.app.Comment;

public class CommentDecorator extends TableDecorator {

	public CommentDecorator() {
		super();
	}
	
	/**
	 * Returns an "action bar" of sorts that allow the user to perform various actions on the 
	 * Comment based on it's id.
	 * @return String
	 */
	public String getAccept()
	{
		Comment object = (Comment) getCurrentRowObject();
		int id = object.getIdComment();
		
		return "<a href=\"accept?idComment="
		+ id
		+ "\">Accept</a>";
	}

	public String getDelete()
	{
		Comment object = (Comment) getCurrentRowObject();
		int id = object.getIdComment();
		
		return "<a href=\"delete?idComment="
		+ id
		+ "\">Delete</a>";
		
	}
	
	

}
